$(function(){
 



   

 
})


window.onload=function(){
    var obj = $(".hot-news");
                            var offsetT = obj.offset().top;
                            var offsetL= obj.offset().left;
                            var objH=obj.height();

                            var leftH=$('.main-left').height();
                            var leftT=$('.main-left').offset().top;

                            var mixT=leftH-objH+leftT-88;

                                $(document).on('scroll',function(){
                                    var scrollT=$(document).scrollTop();
                                    console.log(scrollT+':'+mixT)
                                    if(scrollT > offsetT-64+objH && scrollT < mixT &&  $(window).width()>1000 ){
                                        obj.css({
                                            position:'fixed',
                                            top:'64px',
                                            left:offsetL,
                                            right:'auto',
                                            bottom:'auto'
                                        })
                                    }else if(scrollT > mixT){
                                        obj.css({
                                            position:'absolute',
                                            right:0,
                                            bottom:0,
                                            left:'auto',
                                            top:'auto'
                                        })

                                    }else{
                                        obj.css({
                                            position:'static'
                                        })
                                    }

                                })


}
